package org.framework.lazy.cloud.network.heartbeat.server.standalone.controller;

import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import org.wu.framework.web.spring.EasyController;
import org.springframework.web.bind.annotation.*;
import org.wu.framework.web.response.Result;
import org.wu.framework.web.response.ResultFactory;
import org.springframework.beans.factory.annotation.Autowired;
import jakarta.annotation.Resource;
import org.framework.lazy.cloud.network.heartbeat.server.standalone.domain.model.lazy.netty.client.virtual.route.LazyNettyClientVirtualRoute;
import org.framework.lazy.cloud.network.heartbeat.server.standalone.application.command.lazy.netty.client.virtual.route.LazyNettyClientVirtualRouteRemoveCommand;
import org.framework.lazy.cloud.network.heartbeat.server.standalone.application.command.lazy.netty.client.virtual.route.LazyNettyClientVirtualRouteStoryCommand;
import org.framework.lazy.cloud.network.heartbeat.server.standalone.application.command.lazy.netty.client.virtual.route.LazyNettyClientVirtualRouteUpdateCommand;
import org.framework.lazy.cloud.network.heartbeat.server.standalone.application.command.lazy.netty.client.virtual.route.LazyNettyClientVirtualRouteQueryListCommand;
import org.framework.lazy.cloud.network.heartbeat.server.standalone.application.command.lazy.netty.client.virtual.route.LazyNettyClientVirtualRouteQueryOneCommand;
import org.framework.lazy.cloud.network.heartbeat.server.standalone.application.LazyNettyClientVirtualRouteApplication;
import org.framework.lazy.cloud.network.heartbeat.server.standalone.application.dto.LazyNettyClientVirtualRouteDTO;
import java.util.List;
import org.wu.framework.lazy.orm.database.lambda.domain.LazyPage;
/**
 * describe 客户端虚拟路由管理 
 *
 * @author Jia wei Wu
 * @date 2025/05/06 05:00 下午
 * @see org.wu.framework.lazy.orm.core.persistence.reverse.lazy.ddd.DefaultDDDLazyController 
 **/
@Tag(name = "客户端虚拟路由管理提供者")
@EasyController("/lazy/netty/client/virtual/route")
public class LazyNettyClientVirtualRouteProvider  {

    @Resource
    private LazyNettyClientVirtualRouteApplication lazyNettyClientVirtualRouteApplication;

    /**
     * describe 新增客户端虚拟路由管理
     *
     * @param lazyNettyClientVirtualRouteStoryCommand 新增客户端虚拟路由管理     
     * @return {@link Result<LazyNettyClientVirtualRoute>} 客户端虚拟路由管理新增后领域对象     
     
     * @author Jia wei Wu
     * @date 2025/05/06 05:00 下午
     **/

    @Operation(summary = "新增客户端虚拟路由管理")
    @PostMapping("/story")
    public Result<LazyNettyClientVirtualRoute> story(@RequestBody LazyNettyClientVirtualRouteStoryCommand lazyNettyClientVirtualRouteStoryCommand){
        return lazyNettyClientVirtualRouteApplication.story(lazyNettyClientVirtualRouteStoryCommand);
    }
    /**
     * describe 批量新增客户端虚拟路由管理
     *
     * @param lazyNettyClientVirtualRouteStoryCommandList 批量新增客户端虚拟路由管理     
     * @return {@link Result<List<LazyNettyClientVirtualRoute>>} 客户端虚拟路由管理新增后领域对象集合     
     
     * @author Jia wei Wu
     * @date 2025/05/06 05:00 下午
     **/

    @Operation(summary = "批量新增客户端虚拟路由管理")
    @PostMapping("/batchStory")
    public Result<List<LazyNettyClientVirtualRoute>> batchStory(@RequestBody List<LazyNettyClientVirtualRouteStoryCommand> lazyNettyClientVirtualRouteStoryCommandList){
        return lazyNettyClientVirtualRouteApplication.batchStory(lazyNettyClientVirtualRouteStoryCommandList);
    }
    /**
     * describe 更新客户端虚拟路由管理
     *
     * @param lazyNettyClientVirtualRouteUpdateCommand 更新客户端虚拟路由管理     
     * @return {@link Result<LazyNettyClientVirtualRoute>} 客户端虚拟路由管理领域对象     
     
     * @author Jia wei Wu
     * @date 2025/05/06 05:00 下午
     **/

    @Operation(summary = "更新客户端虚拟路由管理")
    @PutMapping("/updateOne")
    public Result<LazyNettyClientVirtualRoute> updateOne(@RequestBody LazyNettyClientVirtualRouteUpdateCommand lazyNettyClientVirtualRouteUpdateCommand){
        return lazyNettyClientVirtualRouteApplication.updateOne(lazyNettyClientVirtualRouteUpdateCommand);
    }
    /**
     * describe 查询单个客户端虚拟路由管理
     *
     * @param lazyNettyClientVirtualRouteQueryOneCommand 查询单个客户端虚拟路由管理     
     * @return {@link Result<LazyNettyClientVirtualRouteDTO>} 客户端虚拟路由管理DTO对象     
     
     * @author Jia wei Wu
     * @date 2025/05/06 05:00 下午
     **/

    @Operation(summary = "查询单个客户端虚拟路由管理")
    @GetMapping("/findOne")
    public Result<LazyNettyClientVirtualRouteDTO> findOne(@ModelAttribute LazyNettyClientVirtualRouteQueryOneCommand lazyNettyClientVirtualRouteQueryOneCommand){
        return lazyNettyClientVirtualRouteApplication.findOne(lazyNettyClientVirtualRouteQueryOneCommand);
    }
    /**
     * describe 查询多个客户端虚拟路由管理
     *
     * @param lazyNettyClientVirtualRouteQueryListCommand 查询多个客户端虚拟路由管理     
     * @return {@link Result<List<LazyNettyClientVirtualRouteDTO>>} 客户端虚拟路由管理DTO对象     
     
     * @author Jia wei Wu
     * @date 2025/05/06 05:00 下午
     **/

    @Operation(summary = "查询多个客户端虚拟路由管理")
    @GetMapping("/findList")
    public Result<List<LazyNettyClientVirtualRouteDTO>> findList(@ModelAttribute LazyNettyClientVirtualRouteQueryListCommand lazyNettyClientVirtualRouteQueryListCommand){
        return lazyNettyClientVirtualRouteApplication.findList(lazyNettyClientVirtualRouteQueryListCommand);
    }
    /**
     * describe 分页查询多个客户端虚拟路由管理
     *
     * @param lazyNettyClientVirtualRouteQueryListCommand 分页查询多个客户端虚拟路由管理     
     * @return {@link Result<LazyPage<LazyNettyClientVirtualRouteDTO>>} 分页客户端虚拟路由管理DTO对象     
     
     * @author Jia wei Wu
     * @date 2025/05/06 05:00 下午
     **/

    @Operation(summary = "分页查询多个客户端虚拟路由管理")
    @GetMapping("/findPage")
    public Result<LazyPage<LazyNettyClientVirtualRouteDTO>> findPage(@Parameter(description ="分页大小") @RequestParam(defaultValue = "10", value = "size") int size,
                           @Parameter(description ="当前页数") @RequestParam(defaultValue = "1", value = "current") int current,@ModelAttribute LazyNettyClientVirtualRouteQueryListCommand lazyNettyClientVirtualRouteQueryListCommand){
        return lazyNettyClientVirtualRouteApplication.findPage(size,current,lazyNettyClientVirtualRouteQueryListCommand);
    }
    /**
     * describe 删除客户端虚拟路由管理
     *
     * @param lazyNettyClientVirtualRouteRemoveCommand 删除客户端虚拟路由管理     
     * @return {@link Result<LazyNettyClientVirtualRoute>} 客户端虚拟路由管理     
     
     * @author Jia wei Wu
     * @date 2025/05/06 05:00 下午
     **/

    @Operation(summary = "删除客户端虚拟路由管理")
    @DeleteMapping("/remove")
    public Result<LazyNettyClientVirtualRoute> remove(@ModelAttribute LazyNettyClientVirtualRouteRemoveCommand lazyNettyClientVirtualRouteRemoveCommand){
        return lazyNettyClientVirtualRouteApplication.remove(lazyNettyClientVirtualRouteRemoveCommand);
    }
}